﻿using Equipment.Infrastructure.Interfaces;
using Equipment.API;
using Equipment.Errorcode;

namespace Equipment.API.Application.Service.OutgoinginspectionService
{
    public class InspectiondepartmentService
    {
        private readonly IInspectiondepartmentRepository _inspectiondepartmentRepository;
        public InspectiondepartmentService(IInspectiondepartmentRepository inspectiondepartmentRepository)
        {
            _inspectiondepartmentRepository = inspectiondepartmentRepository;
        }

        /// <summary>
        /// 获取检验部门列表信息
        /// </summary>
        /// <returns></returns>
        public async Task<ApiResult> GetInspectiondepartmentList()
        {
            var inspectiondepartmentList = await _inspectiondepartmentRepository.GetAllAsync();

            return ApiResult.Ok(inspectiondepartmentList, "获取检验部门列表成功");
        }
    }
}
